public class A1 {
    public class Thoroughbred {
        // 私有属性
        private String mother;
        private String father;
        private int birthyear;

        // 构造方法，用于初始化对象
        public Thoroughbred(String mother, String father, int birthyear) {
            this.mother = mother;
            this.father = father;
            this.birthyear = birthyear;
        }

        // 获取当前年龄的方法
        public int getCurrentAge() {
            int currentYear = java.time.Year.now().getValue(); // 获取当前年份
            return currentYear - this.birthyear;
        }

        // 获取父亲名字的方法
        public String getFather() {
            return this.father;
        }

        // 获取母亲名字的方法
        public String getMother() {
            return this.mother;
        }


    }
}
